package zobjpro;


import java.util.ArrayList;

public class StudentTest {
    public static void main(String[] args) {
        //创建集合
        ArrayList<Student> list = new ArrayList<>();
        //创建学生对象
        Student s1 = new Student("tx",20,"男");
        Student s2 = new Student("lo",21,"女");
        Student s3 = new Student("wn",22,"男");
        //把学生对象添加到集合
        list.add(s1);
        list.add(s2);
        list.add(s3);
        //调用工具类的方法
        int maxAgeStudent = StudentUtil.getMaxAgeStudent(list);
        System.out.println(maxAgeStudent);

    }
}
